package com.huluobo.a2202mvvm_im_douyindemo.chat;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.a2202mvvm_im_douyindemo.mvvmBase.BaseViewModel;
import com.hyphenate.chat.EMMessage;

/**
 * Created by LC on 2024/4/29.
 */
public class ChatViewModel extends BaseViewModel<ChatRepo> {
    MutableLiveData<EMMessage> sendMessageSuccess = new MutableLiveData<>();
    MutableLiveData<String> sendMessageFailed = new MutableLiveData<>();

    public void sendMessage(String username, String content, int chatType) {
        repo.sendMessage(username, content, chatType, sendMessageSuccess, sendMessageFailed);
    }

    @Override
    protected ChatRepo createRepo() {
        return new ChatRepo();
    }
}
